
$(function () {


    form.click(function () {
        $.ajax({
            type: "POST",
            url: "/sso/admin/user/allotRoles",
            data: form.serialize(),
            async:false,
            success: function(data){
                if (data.status === 200) {
                    parent.layer.msg("权限分配成功");
                    var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                    parent.layer.close(index); //再执行关闭
                } else {
                    layer.msg("分配失败请重试");
                }
            }
        });
    });
});